﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Reflection;
using log4net;

namespace DistributeTransaction.Controllers
{
    public class HomeController : BaseController
    {
        private ILog log = LogManager.GetLogger(typeof(HomeController));

        public ActionResult Index()
        {
            ViewBag.Message = "Welcome to Online Order Demo!";

            if (User != null && User.Identity.IsAuthenticated)
            {
                ViewBag.SubText = "Dashboard:";
                ViewBag.CustomerId = CustomerId;
            }
            else
            {
                ViewBag.SubText = "Please login with your username & password.";
            }

            return View();
        }

        public ActionResult About()
        {
            ViewBag.Version = Assembly.GetExecutingAssembly().GetName().Version;
            return View();
        }
    }
}
